<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
<script type="text/javascript">
	function jc(n) {
	var n=document.getElementById('jiecheng1').value;
	//var fact= 1;
     for(var i=1,fact=1;i<=n;i++) {
	  fact = fact*i;
     }
alert(fact);
}

</script>
</head>
<body>
<input name="jiecheng1" id="jiecheng1">
<input type="button" value="计算"  onclick="jc()">

</body>
</html>